var cityData=require("./citydata.js");  //对citydata的数据进行引入
Page({
  data: {
    cityData:cityData,
    citys:cityData[0].city,
    districtAndCounty:cityData[0].city[0].districtAndCounty,
    value:[],
  },
  onChange(e) {
    this.setData({
      value: e.detail.value,
    });
    this.setData({
      citys:cityData[this.data.value[0]].city,
      districtAndCounty:cityData[this.data.value[0]].city[this.data.value[1]].districtAndCounty
    });
   console.log(cityData[e.detail.value[0]].provinces,this.data.citys[e.detail.value[1]].name,this.data.districtAndCounty[e.detail.value[2]]);
  },
  
});
